package com.itjiange.service.client;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itjiange.common.common.ErrorCode;
import com.itjiange.common.exception.BusinessException;
import com.itjiange.common.exception.ThrowUtils;
import com.itjiange.model.dto.question.QuestionQueryRequest;
import com.itjiange.model.entity.Question;
import com.itjiange.model.entity.QuestionSubmit;
import com.itjiange.model.entity.User;
import com.itjiange.model.vo.QuestionVO;
import com.itjiange.model.vo.UserVO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * @author 15117
 * @description 针对表【question(题目)】的数据库操作Service
 * @createDate 2024-03-19 08:00:32
 */
@FeignClient(name = "yijian-backend-question-service-9102", path = "/api/question/inner")
public interface QuestionFeignClient {

    /**
     * 利用id查詢題目
     * @param id
     * @return
     */
    @GetMapping("/get/question/{id}")
    Question getQuestionById(@PathVariable("id") long id);

    /**
     * 利用id查詢提交題目
     * @param id
     * @return
     */
    @GetMapping("/get/question_submit/{id}")
    QuestionSubmit getQuestionSubmitById(@PathVariable("id") long id);

    /**
     * 更新题目提交信息
     * @param questionSubmit
     * @return
     */
    @PutMapping("/update/question_submit")
    boolean updateById(@RequestBody QuestionSubmit questionSubmit);

}
